package com.ctgu.expresshelper.service.Express.impl;

import com.ctgu.expresshelper.dao.ExpressDao;
import com.ctgu.expresshelper.entity.Express;
import com.ctgu.expresshelper.service.Express.ExpressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExpressServiceImpl implements ExpressService {

    @Autowired
    private ExpressDao expressDao;

    @Override
    public Express selectExpressByNum(String expressNum,String userid) {
        return expressDao.selectExpressByNum(expressNum,userid);
    }

    @Override
    public void addExpress(Express express) {
        expressDao.addExpress(express);
    }

    @Override
    public void deleteExpress(String expressNum, int userid) {
        expressDao.deleteExpress(expressNum,userid);
    }

    @Override
    public List<Express> selectAllExpressByUserid(int userid) {
        return expressDao.selectAllExpressByUserid(userid);
    }

    @Override
    public List<Express> selectExpressByUseridAndStatus(int userid, int status) {
        return expressDao.selectExpressByUseridAndStatus(userid,status);
    }
}
